if(!dojo._hasResource["market.widgets.component.TribeNews"]){
dojo._hasResource["market.widgets.component.TribeNews"]=true;
require(["dojo/_base/declare","market/widgets/component/Content","dojo/query","dojo/dom","dojo/_base/array","dojo/dom-construct"],function(declare,_wcontent,query,dom,array,construct){
declare("market.widgets.component.TribeNews",[_wcontent],{
_tmpl:'<div style="padding:5px;"><div class="nickNameHeader1">{name}</div>'+((participant.isGuest)?'':'<div class="sub_menu_title_right"><a href="#" id="hrefAddTribeNews">{btnlabel}</a></div>')+'</div><div class="clear"></div>',
_tribeTmpl:'<div class="box_tribe">{pictures}<div style="margin:5px">&nbsp;&nbsp;&nbsp;{content}</div>',
_picTmpl:'<div style="text-align:center"><img src="getContent/{guid}/medium" class="box_picture_noShadow border_thin"/></div>',
tribeGUID:null,
show:function(){
   var w=this;
   var args = {ajaxUrl:'tribe/'+this.tribeGUID+'/news',contentId:this.contentId,callback:function(data){
      w._parseNews(data);
   }};
   SYSTEMWIDGET.ajaxWidget(args).callXhrGetJson();
},
_target:function(){
      return this.contentId;
},
_parseNews:function(tribe){
   var w=this;
   this._target().innerHTML='';
   var news=tribe.news;
   for(var index=0;index<news.length;index++){
      var content=news[index];
      var pictureHtml='';
      array.forEach(content.contentFiles,function(file,i){
         pictureHtml+=dojo.replace(w._picTmpl,file);
      });
      content.pictures=pictureHtml;
      content.latestComment=this._latestComment(content.comments, content.guid);
      var tmpl=this._tribeTmpl+this._likeTmpl;
      var divNews=construct.create('div',{innerHTML:dojo.replace(tmpl,content)},this._target(),'last');
      this._newEvents(divNews);
   }
   construct.create('div',{innerHTML:dojo.replace(this._tmpl,tribe)},this._target(),'first');
},
});});}
